/** \file eff_manager.c 
*/

#define EFF_MANAGER
#include "eff_manager.h"




/** Number of the current effect to be executed.
*/
static u8 u8CurrentEffect;

u8 EFF_au8EffectsBuffer[EFF_nEFFECTS_BUFFER_LENGTH];


tpfEffect pCurrentEffect;
tpfEffect pEffectInit;


void EFF_vidInit(void)
{
	u8 u8Iterator;
    u8CurrentEffect = TYP_u8ZERO;
	
	pEffectInit = (tpfEffect)pgm_read_word(&apfEffectInit[u8CurrentEffect]);
	(*pEffectInit)();
	//LSC_vidInit();
	pCurrentEffect = (tpfEffect)pgm_read_word(&apfEffectFunctions[u8CurrentEffect]);
	
	for (u8Iterator = TYP_u8ZERO; u8Iterator < (u8)EFF_nEFFECTS_BUFFER_LENGTH ; u8Iterator++)
	{
		EFF_au8EffectsBuffer[u8Iterator] =  TYP_u8ZERO;
	}
	
	return;
      
}


void EFF_vidMainFunction(void)
{
	
	(*pCurrentEffect)();
	//LSC_vidLeftScrollEffect();
	return;
}


void EFF_SetEffect(u8 u8EffectName)
{

	u8CurrentEffect = u8EffectName;
	return;
}
